package cn.lyn4ever.cataccount.controller;

import cn.lyn4ever.cataccount.entity.IconUserPath;
import cn.lyn4ever.cataccount.service.IconUserPathService;
import cn.lyn4ever.common.R;
import cn.lyn4ever.common.SecurityParameter;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (IconUserPath)表控制层
 *
 * @author makejava
 * @since 2019-09-21 16:21:51
 */
@RestController
@RequestMapping("icon")
public class IconUserPathController {
    /**
     * 服务对象
     */
    @Resource
    private IconUserPathService iconUserPathService;

//    /**
//     * 通过主键查询单条数据
//     *
//     * @param id 主键
//     * @return 单条数据
//     */
//    @GetMapping("selectOne")
//    public IconUserPath selectOne(Integer id) {
//        return this.iconUserPathService.queryById(id);
//    }

    /**
     * 得到用户自己的图标
     *
     * @return
     */
    @RequestMapping("getMyIcon")
    public R getAllIcon(@RequestBody IconUserPath path) {
        return iconUserPathService.getAllIcon(path);
    }



    /**
     * 查询财产统计
     *
     * @param iconUserPath
     * @return
     */
    @RequestMapping("insertOne")
    @SecurityParameter
    public R getAnalysisProperty(@RequestBody IconUserPath iconUserPath) {
        return iconUserPathService.insert(iconUserPath);
    }

}